package com.example.yupao.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.yupao.model.domain.Team;
import com.example.yupao.model.request.*;
import com.example.yupao.model.request.TeamQuitRequest;
import com.example.yupao.model.vo.TeamVO;
import com.example.yupao.model.vo.UserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 86138
* @description 针对表【team】的数据库操作Service
* @createDate 2024-09-18 22:47:52
*/
public interface TeamService extends IService<Team> {

    /**
     * 创建队伍
     * @param teamAddRequest
     * @param request
     * @return
     */
    boolean addTeam(TeamAddRequest teamAddRequest, HttpServletRequest request);

    /**
     * 搜索队伍
     * @param teamSearchRequest
     * @param request
     * @return
     */
    List<TeamVO> searchTeam(TeamSearchRequest teamSearchRequest, HttpServletRequest request);

    /**
     * 分页搜索队伍
     * @param teamSearchRequest
     * @param request
     * @return
     */
    Page<TeamVO> searchTeamPage(TeamSearchRequest teamSearchRequest, HttpServletRequest request);

    /**
     * 解散队伍
     * @param teamQuitRequest
     * @param request
     * @return
     */
    boolean removeTeam(TeamQuitRequest teamQuitRequest, HttpServletRequest request);

    /**
     * 退出队伍
     * @param teamQuitRequest
     * @param request
     * @return
     */
    boolean quitTeam(TeamQuitRequest teamQuitRequest, HttpServletRequest request);

    /**
     * 更新队伍信息
     * @param teamAddRequest
     * @param request
     * @return
     */
    boolean updateTeam(TeamAddRequest teamAddRequest, HttpServletRequest request);

    /**
     * 加入队伍
     * @param teamJoinRequest
     * @param request
     * @return
     */
    boolean joinTeam(TeamJoinRequest teamJoinRequest, HttpServletRequest request);


    /**
     * 搜素我创建的队伍
     * @param request
     * @return
     */
    List<TeamVO> searchTeamMyJoin(HttpServletRequest request);
}
